This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
RE: LS2J security exception ~Tanita Quetfreegenli 1.Sep.03 05:01 PM a Web browser Domino Server 6.0.2 CF1Windows 2000
I have tried your code on my local Notes client and it has worked correctly. I am sorry but i can not test it on a Domino Server because our Server is still on R5 :-(.
But i have one hint for you. In your code you acess the System properties with System.getProperties. In my opinion this asks the securityManager, is it allowed to write to all propertys. Maybe it ist better to set the properties with System.setProperty(key,value). Your code should then look like this:
import java.net.*;
import java.io.*;
public class URLReader {
public boolean on = false;
public void download(String url, String filename) throws Exception
{
try{
System.setProperty("proxySet", "true" );
System.setProperty("proxyHost", "proxy1" );
System.setProperty("proxyPort", "8080" );
URL urlname = new URL(url);
File outputFile = new File(filename);
FileOutputStream out = new FileOutputStream(outputFile);
BufferedInputStream in = new BufferedInputStream(urlname.openStream());
int input;
while ((input = in.read()) != -1)
{
out.write(input);
}
in.close();
out.close();
}
catch(java.lang.SecurityException e){
e.printStackTrace();
}
}
}
I hope this helps
Greetings
Ralf M Petter
P. S. Es gibt auch ein sehr gutes Lotus Notes Java Forum in Deutsch. www.atnotes.de. Schau einfach mal rein.